#ifndef PACKETPROCESSOR_HPP
#define PACKETPROCESSOR_HPP

#include <boost/scoped_ptr.hpp>
#include <boost/thread.hpp>

namespace kieper {
    class IncomingPacket;
    class ConnMgr;

    class PacketProcessor {
    public:
        PacketProcessor(ConnMgr& connMgr);
        ~PacketProcessor();
        void start();
        void processPacket(IncomingPacket* packet);
        bool isReady();
    protected:
    private:
        ConnMgr& connMgr_;
        boost::scoped_ptr<boost::thread> processorThread_;
        bool isReady_;
        boost::mutex isReadyMtx_;

        PacketProcessor(const PacketProcessor& other);
        PacketProcessor& operator=(const PacketProcessor& other);
        void run();
        // void swap(PacketProcessor& other);
    };
}

#endif
